PROJECT(MotionMarkerPlugin)
	
SET(MotionMarkerPlugin_SRCS
	MotionMarkerPlugin.cc
	MotionMarkerExtension.cc
	ModelMarkerExtension.cc
)

SET(MotionMarkerPlugin_MOC_HDRS
	MotionMarkerPlugin.h
	include/toolkit_interfaces.h
)

SET(CMAKE_AUTOMOC ON)
	
INCLUDE_DIRECTORIES (${QT_INCLUDE_DIR})
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}/c3dfile/src)
INCLUDE_DIRECTORIES (${RBDL_INCLUDE_DIR})
INCLUDE_DIRECTORIES (${EIGEN3_INCLUDE_DIR})
INCLUDE_DIRECTORIES (${BOOST_INCLUDE_DIR})

ADD_DEFINITIONS (${QT_DEFINITIONS})
ADD_DEFINITIONS (-DQT_PLUGIN)
ADD_DEFINITIONS (-DQT_SHARED)
#ADD_DEFINITIONS(-DQT_NO_DEBUG)

SET(CMAKE_POSITION_INDEPENDENT_CODE ON)

ADD_LIBRARY (motionmarkerplugin SHARED ${MotionMarkerPlugin_SRCS})

TARGET_LINK_LIBRARIES (motionmarkerplugin 
	${QT_LIBRARIES} 
	${QT_QTXML_LIBRARY} 
	Qt5::Core
	Qt5::Gui
	Qt5::Widgets
	Qt5::3DCore
	Qt5::3DExtras
	Qt5::3DRender
	Qt5::3DInput
	${RBDL_LIBRARY}
	toolkitlib
	c3dfile
)

ADD_SUBDIRECTORY(
	c3dfile
)

INSTALL( TARGETS motionmarkerplugin LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
